Integrand size = 14, antiderivative size = 93 \[ \int \frac {1}{\left (a+b \text {sech}^2(c+d x)\right )^2} \, dx=\frac {x}{a^2}-\frac {\sqrt {b} (3 a+2 b) \text {arctanh}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a+b}}\right )}{2 a^2 (a+b)^{3/2} d}-\frac {b \tanh (c+d x)}{2 a (a+b) d \left (a+b-b \tanh ^2(c+d x)\right )} \]
x/a^2-1/2*(3*a+2*b)*arctanh(b^(1/2)*tanh(d*x+c)/(a+b)^(1/2))*b^(1/2)/a^2/( a+b)^(3/2)/d-1/2*b*tanh(d*x+c)/a/(a+b)/d/(a+b-b*tanh(d*x+c)^2)
Leaf count is larger than twice the leaf count of optimal. \(221\) vs. \(2(93)=186\).
Time = 3.74 (sec) , antiderivative size = 221, normalized size of antiderivative = 2.38 \[ \int \frac {1}{\left (a+b \text {sech}^2(c+d x)\right )^2} \, dx=\frac {(a+2 b+a \cosh (2 (c+d x))) \text {sech}^4(c+d x) \left (2 x (a+2 b+a \cosh (2 (c+d x)))-\frac {b (3 a+2 b) \text {arctanh}\left (\frac {\text {sech}(d x) (\cosh (2 c)-\sinh (2 c)) ((a+2 b) \sinh (d x)-a \sinh (2 c+d x))}{2 \sqrt {a+b} \sqrt {b (\cosh (c)-\sinh (c))^4}}\right ) (a+2 b+a \cosh (2 (c+d x))) (\cosh (2 c)-\sinh (2 c))}{(a+b)^{3/2} d \sqrt {b (\cosh (c)-\sinh (c))^4}}+\frac {b \text {sech}(2 c) ((a+2 b) \sinh (2 c)-a \sinh (2 d x))}{(a+b) d}\right )}{8 a^2 \left (a+b \text {sech}^2(c+d x)\right )^2} \]
((a + 2*b + a*Cosh[2*(c + d*x)])*Sech[c + d*x]^4*(2*x*(a + 2*b + a*Cosh[2* (c + d*x)]) - (b*(3*a + 2*b)*ArcTanh[(Sech[d*x]*(Cosh[2*c] - Sinh[2*c])*(( a + 2*b)*Sinh[d*x] - a*Sinh[2*c + d*x]))/(2*Sqrt[a + b]*Sqrt[b*(Cosh[c] - Sinh[c])^4])]*(a + 2*b + a*Cosh[2*(c + d*x)])*(Cosh[2*c] - Sinh[2*c]))/((a + b)^(3/2)*d*Sqrt[b*(Cosh[c] - Sinh[c])^4]) + (b*Sech[2*c]*((a + 2*b)*Sin h[2*c] - a*Sinh[2*d*x]))/((a + b)*d)))/(8*a^2*(a + b*Sech[c + d*x]^2)^2)
Time = 0.28 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.20, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3042, 4616, 316, 25, 397, 219, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {1}{\left (a+b \text {sech}^2(c+d x)\right )^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\left (a+b \sec (i c+i d x)^2\right )^2}dx\) |
\(\Big \downarrow \) 4616 |
\(\displaystyle \frac {\int \frac {1}{\left (1-\tanh ^2(c+d x)\right ) \left (-b \tanh ^2(c+d x)+a+b\right )^2}d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 316 |
\(\displaystyle \frac {-\frac {\int -\frac {b \tanh ^2(c+d x)+2 a+b}{\left (1-\tanh ^2(c+d x)\right ) \left (-b \tanh ^2(c+d x)+a+b\right )}d\tanh (c+d x)}{2 a (a+b)}-\frac {b \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )}}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\int \frac {b \tanh ^2(c+d x)+2 a+b}{\left (1-\tanh ^2(c+d x)\right ) \left (-b \tanh ^2(c+d x)+a+b\right )}d\tanh (c+d x)}{2 a (a+b)}-\frac {b \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )}}{d}\) |
\(\Big \downarrow \) 397 |
\(\displaystyle \frac {\frac {\frac {2 (a+b) \int \frac {1}{1-\tanh ^2(c+d x)}d\tanh (c+d x)}{a}-\frac {b (3 a+2 b) \int \frac {1}{-b \tanh ^2(c+d x)+a+b}d\tanh (c+d x)}{a}}{2 a (a+b)}-\frac {b \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )}}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\frac {\frac {2 (a+b) \text {arctanh}(\tanh (c+d x))}{a}-\frac {b (3 a+2 b) \int \frac {1}{-b \tanh ^2(c+d x)+a+b}d\tanh (c+d x)}{a}}{2 a (a+b)}-\frac {b \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )}}{d}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\frac {\frac {2 (a+b) \text {arctanh}(\tanh (c+d x))}{a}-\frac {\sqrt {b} (3 a+2 b) \text {arctanh}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b}}}{2 a (a+b)}-\frac {b \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )}}{d}\) |
(((2*(a + b)*ArcTanh[Tanh[c + d*x]])/a - (Sqrt[b]*(3*a + 2*b)*ArcTanh[(Sqr t[b]*Tanh[c + d*x])/Sqrt[a + b]])/(a*Sqrt[a + b]))/(2*a*(a + b)) - (b*Tanh [c + d*x])/(2*a*(a + b)*(a + b - b*Tanh[c + d*x]^2)))/d
3.2.53.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim p[(-b)*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(2*a*(p + 1)*(b*c - a*d)) ), x] + Simp[1/(2*a*(p + 1)*(b*c - a*d)) Int[(a + b*x^2)^(p + 1)*(c + d*x ^2)^q*Simp[b*c + 2*(p + 1)*(b*c - a*d) + d*b*(2*(p + q + 2) + 1)*x^2, x], x ], x] /; FreeQ[{a, b, c, d, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && ! ( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomialQ[a, b, c, d, 2, p, q, x]
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ Symbol] :> Simp[(b*e - a*f)/(b*c - a*d) Int[1/(a + b*x^2), x], x] - Simp[ (d*e - c*f)/(b*c - a*d) Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e , f}, x]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f Subst[Int[(a + b + b*ff^2*x^2)^p /(1 + ff^2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && NeQ[a + b, 0] && NeQ[p, -1]
Leaf count of result is larger than twice the leaf count of optimal. \(253\) vs. \(2(81)=162\).
Time = 0.57 (sec) , antiderivative size = 254, normalized size of antiderivative = 2.73
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2}}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a^{2}}+\frac {2 b \left (\frac {-\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 \left (a +b \right )}-\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right )}}{\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a +\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} b +2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a +b}+\frac {\left (3 a +2 b \right ) \left (-\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}+\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}\right )}{2 a +2 b}\right )}{a^{2}}}{d}\) | \(254\) |
default | \(\frac {\frac {\ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2}}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a^{2}}+\frac {2 b \left (\frac {-\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 \left (a +b \right )}-\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right )}}{\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a +\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} b +2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a +b}+\frac {\left (3 a +2 b \right ) \left (-\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}+\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}\right )}{2 a +2 b}\right )}{a^{2}}}{d}\) | \(254\) |
risch | \(\frac {x}{a^{2}}+\frac {b \left ({\mathrm e}^{2 d x +2 c} a +2 b \,{\mathrm e}^{2 d x +2 c}+a \right )}{a^{2} \left (a +b \right ) d \left (a \,{\mathrm e}^{4 d x +4 c}+2 \,{\mathrm e}^{2 d x +2 c} a +4 b \,{\mathrm e}^{2 d x +2 c}+a \right )}+\frac {3 \sqrt {\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {\left (a +b \right ) b}+a +2 b}{a}\right )}{4 \left (a +b \right )^{2} d a}+\frac {\sqrt {\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {\left (a +b \right ) b}+a +2 b}{a}\right ) b}{2 \left (a +b \right )^{2} d \,a^{2}}-\frac {3 \sqrt {\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {\left (a +b \right ) b}-a -2 b}{a}\right )}{4 \left (a +b \right )^{2} d a}-\frac {\sqrt {\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {\left (a +b \right ) b}-a -2 b}{a}\right ) b}{2 \left (a +b \right )^{2} d \,a^{2}}\) | \(288\) |
1/d*(1/a^2*ln(1+tanh(1/2*d*x+1/2*c))-1/a^2*ln(tanh(1/2*d*x+1/2*c)-1)+2/a^2 *b*((-1/2*a/(a+b)*tanh(1/2*d*x+1/2*c)^3-1/2*a/(a+b)*tanh(1/2*d*x+1/2*c))/( tanh(1/2*d*x+1/2*c)^4*a+tanh(1/2*d*x+1/2*c)^4*b+2*tanh(1/2*d*x+1/2*c)^2*a- 2*tanh(1/2*d*x+1/2*c)^2*b+a+b)+1/2*(3*a+2*b)/(a+b)*(-1/4/b^(1/2)/(a+b)^(1/ 2)*ln((a+b)^(1/2)*tanh(1/2*d*x+1/2*c)^2+2*tanh(1/2*d*x+1/2*c)*b^(1/2)+(a+b )^(1/2))+1/4/b^(1/2)/(a+b)^(1/2)*ln((a+b)^(1/2)*tanh(1/2*d*x+1/2*c)^2-2*ta nh(1/2*d*x+1/2*c)*b^(1/2)+(a+b)^(1/2)))))
Leaf count of result is larger than twice the leaf count of optimal. 707 vs. \(2 (84) = 168\).
Time = 0.30 (sec) , antiderivative size = 1690, normalized size of antiderivative = 18.17 \[ \int \frac {1}{\left (a+b \text {sech}^2(c+d x)\right )^2} \, dx=\text {Too large to display} \]
[1/4*(4*(a^2 + a*b)*d*x*cosh(d*x + c)^4 + 16*(a^2 + a*b)*d*x*cosh(d*x + c) *sinh(d*x + c)^3 + 4*(a^2 + a*b)*d*x*sinh(d*x + c)^4 + 4*(a^2 + a*b)*d*x + 4*(2*(a^2 + 3*a*b + 2*b^2)*d*x + a*b + 2*b^2)*cosh(d*x + c)^2 + 4*(6*(a^2 + a*b)*d*x*cosh(d*x + c)^2 + 2*(a^2 + 3*a*b + 2*b^2)*d*x + a*b + 2*b^2)*s inh(d*x + c)^2 + ((3*a^2 + 2*a*b)*cosh(d*x + c)^4 + 4*(3*a^2 + 2*a*b)*cosh (d*x + c)*sinh(d*x + c)^3 + (3*a^2 + 2*a*b)*sinh(d*x + c)^4 + 2*(3*a^2 + 8 *a*b + 4*b^2)*cosh(d*x + c)^2 + 2*(3*(3*a^2 + 2*a*b)*cosh(d*x + c)^2 + 3*a ^2 + 8*a*b + 4*b^2)*sinh(d*x + c)^2 + 3*a^2 + 2*a*b + 4*((3*a^2 + 2*a*b)*c osh(d*x + c)^3 + (3*a^2 + 8*a*b + 4*b^2)*cosh(d*x + c))*sinh(d*x + c))*sqr t(b/(a + b))*log((a^2*cosh(d*x + c)^4 + 4*a^2*cosh(d*x + c)*sinh(d*x + c)^ 3 + a^2*sinh(d*x + c)^4 + 2*(a^2 + 2*a*b)*cosh(d*x + c)^2 + 2*(3*a^2*cosh( d*x + c)^2 + a^2 + 2*a*b)*sinh(d*x + c)^2 + a^2 + 8*a*b + 8*b^2 + 4*(a^2*c osh(d*x + c)^3 + (a^2 + 2*a*b)*cosh(d*x + c))*sinh(d*x + c) + 4*((a^2 + a* b)*cosh(d*x + c)^2 + 2*(a^2 + a*b)*cosh(d*x + c)*sinh(d*x + c) + (a^2 + a* b)*sinh(d*x + c)^2 + a^2 + 3*a*b + 2*b^2)*sqrt(b/(a + b)))/(a*cosh(d*x + c )^4 + 4*a*cosh(d*x + c)*sinh(d*x + c)^3 + a*sinh(d*x + c)^4 + 2*(a + 2*b)* cosh(d*x + c)^2 + 2*(3*a*cosh(d*x + c)^2 + a + 2*b)*sinh(d*x + c)^2 + 4*(a *cosh(d*x + c)^3 + (a + 2*b)*cosh(d*x + c))*sinh(d*x + c) + a)) + 4*a*b + 8*(2*(a^2 + a*b)*d*x*cosh(d*x + c)^3 + (2*(a^2 + 3*a*b + 2*b^2)*d*x + a*b + 2*b^2)*cosh(d*x + c))*sinh(d*x + c))/((a^4 + a^3*b)*d*cosh(d*x + c)^4...
\[ \int \frac {1}{\left (a+b \text {sech}^2(c+d x)\right )^2} \, dx=\int \frac {1}{\left (a + b \operatorname {sech}^{2}{\left (c + d x \right )}\right )^{2}}\, dx \]
Leaf count of result is larger than twice the leaf count of optimal. 187 vs. \(2 (84) = 168\).
Time = 0.30 (sec) , antiderivative size = 187, normalized size of antiderivative = 2.01 \[ \int \frac {1}{\left (a+b \text {sech}^2(c+d x)\right )^2} \, dx=\frac {{\left (3 \, a b + 2 \, b^{2}\right )} \log \left (\frac {a e^{\left (-2 \, d x - 2 \, c\right )} + a + 2 \, b - 2 \, \sqrt {{\left (a + b\right )} b}}{a e^{\left (-2 \, d x - 2 \, c\right )} + a + 2 \, b + 2 \, \sqrt {{\left (a + b\right )} b}}\right )}{4 \, {\left (a^{3} + a^{2} b\right )} \sqrt {{\left (a + b\right )} b} d} - \frac {a b + {\left (a b + 2 \, b^{2}\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{{\left (a^{4} + a^{3} b + 2 \, {\left (a^{4} + 3 \, a^{3} b + 2 \, a^{2} b^{2}\right )} e^{\left (-2 \, d x - 2 \, c\right )} + {\left (a^{4} + a^{3} b\right )} e^{\left (-4 \, d x - 4 \, c\right )}\right )} d} + \frac {d x + c}{a^{2} d} \]
1/4*(3*a*b + 2*b^2)*log((a*e^(-2*d*x - 2*c) + a + 2*b - 2*sqrt((a + b)*b)) /(a*e^(-2*d*x - 2*c) + a + 2*b + 2*sqrt((a + b)*b)))/((a^3 + a^2*b)*sqrt(( a + b)*b)*d) - (a*b + (a*b + 2*b^2)*e^(-2*d*x - 2*c))/((a^4 + a^3*b + 2*(a ^4 + 3*a^3*b + 2*a^2*b^2)*e^(-2*d*x - 2*c) + (a^4 + a^3*b)*e^(-4*d*x - 4*c ))*d) + (d*x + c)/(a^2*d)
\[ \int \frac {1}{\left (a+b \text {sech}^2(c+d x)\right )^2} \, dx=\int { \frac {1}{{\left (b \operatorname {sech}\left (d x + c\right )^{2} + a\right )}^{2}} \,d x } \]
Timed out. \[ \int \frac {1}{\left (a+b \text {sech}^2(c+d x)\right )^2} \, dx=\int \frac {1}{{\left (a+\frac {b}{{\mathrm {cosh}\left (c+d\,x\right )}^2}\right )}^2} \,d x \]